import 'package:flutter/cupertino.dart';

/// Created by changlei on 2024/2/23.
///
/// 透明的NavigationBar
class TransparentNavigationBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
  /// 透明的NavigationBar
  const TransparentNavigationBar({Key? key}) : super(key: key);

  @override
  Size get preferredSize => const Size.fromHeight(kMinInteractiveDimensionCupertino);

  @override
  bool shouldFullyObstruct(BuildContext context) => false;

  @override
  Widget build(BuildContext context) {
    return const SafeArea(
      bottom: false,
      child: Align(
        alignment: Alignment.centerLeft,
        child: CupertinoNavigationBarBackButton(),
      ),
    );
  }
}
